﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Practice.DTO;
using Practice.PH4_2104A.IService;

namespace Practice.API.Controllers.product
{
    [Route("product")]
    [ApiController]
    public class ProductController : ControllerBase
    {
        ISKUService _service;

        public ProductController(ISKUService service)
        {
            _service = service;
        }

        /// <summary>
        /// 添加产品
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult Insert(ProductInputDTO dto)
        {
            ReseponseResultDTO response = new();
            _service.Insert(dto);
            return Ok(response);
        }

        //public IActionResult Get()
        //{

        //    ReseponseResultDTO response = new();
        //    _service.GetAll();
        //    return Ok(response);
        //}

    }
}
